package com.lh.service.impl;

import com.lh.dao.AddressDao;
import com.lh.entity.Address;
import com.lh.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author: LuoHang
 * @Date: 2021/2/13 17:06
 * @Description
 */
@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private AddressDao addressDao;

    @Override
    public List<Address> getAddress(Map<String, Object> map) {
        return addressDao.getAddress(map);
    }

    @Override
    public Address getAddressById(Integer id) {
        return addressDao.getAddressById(id);
    }

    @Override
    public int addAddress(Address address) {
        return addressDao.addAddress(address);
    }

    @Override
    public int updateAddress(Map<String, Object> map) {
        return addressDao.updateAddress(map);
    }

    @Override
    public Address getAddressByIdOn(Integer id) {
        return addressDao.getAddressByIdOn(id);
    }
}
